<?php
header("Content-Type:text/html;charset=utf-8");
include("config.php");
$thispid=str_replace("_0_0","",str_replace("mm_","",$userpid));

if(isset($_POST['button'])){
	$url='http://z.alimama.com/tksEncrypt.php?';
	$url.='&q='.urlencode(iconv('utf-8','gb2312',$_POST['q']));
	$url.='&pid='.$_POST['pid'];
	if(isset($_POST['cat'])){$url.='&cat='.$_POST['cat'];}
	$url.='&unid='.$_POST['unid'];
	$url.='&commend='.$_POST['commend'];
	$url.='&search_type='.$_POST['search_type'];
	$url.='&f='.$_POST['f'];
	$url.='&at_topsearch='.$_POST['at_topsearch'];
	$url.='&sid='.$_POST['sid'];
	$url.='&sort='.$_POST['sort'];
	$url.='&spercent='.$_POST['spercent'];
	echo"<script language='javascript'>window.location='".addslashes($url)."';document.getElementById('q').innerHTML='".$_POST['q']."'</script>";
}


$cache=false;
$smar=new MySmarty($cache,$cachetime,$moban);
$smarty=$smar->get_smarty();
//head
$smarty->assign("thispid",$thispid);
$smarty->assign("thistitle",$thistitle);
$smarty->assign("webname",$webname);
$smarty->assign("postfix",$postfix);
$smarty->assign("description",$description);
$smarty->assign("keywords",$keywords);
$smarty->assign("website",$website);
$smarty->assign("moban",$moban);

$smarty->assign("QQ",$QQ);
$smarty->assign("ICP",$ICP);
$smarty->assign("tongji",$tongji);
$smarty->assign("jiathis",$jiathis);

$smarty->display("gsearch.html");
?>

